package com.lx.pc.mybatis.repository.wordercategory;

import java.math.BigInteger;
import java.util.List;

import org.springframework.data.mybatis.repository.annotation.Query;
import org.springframework.data.mybatis.repository.support.MybatisRepository;
import org.springframework.stereotype.Repository;

import com.lx.pc.domain.entity.wordercategory.WOrderCategoryEntity;

@Repository("wOrderCategoryRepository")
public interface WOrderCategoryRepository extends MybatisRepository<WOrderCategoryEntity, BigInteger>{

	/**
	 * 查询分页
	 * @param WOrderCategoryEntity
	 * @param page
	 * @param size
	 * @return
	 */
	@Query("findByWOrderCategory")
	public List<WOrderCategoryEntity> findByWOrderCategory(WOrderCategoryEntity orderCategoryEntity);
	
	/**
	 * 根据订单编号计算总价
	 */
	@Query("findBySumPrice")
	public WOrderCategoryEntity findBySumPrice(WOrderCategoryEntity orderCategoryEntity);
	
	/**
	 * 修改
	 * @param orderCategoryVo
	 * @return
	 */
	@Query("updateOrderCategory")
	public Integer updateOrderCategory(WOrderCategoryEntity orderCategoryEntity);
	
	/**
	 * 根据当前回收员计算当天总支出
	 * @param orderCategoryEntity
	 * @return
	 */
	@Query("findByTotalPriceCount")
	public Float findByTotalPriceCount(WOrderCategoryEntity orderCategoryEntity);
}
